from django.contrib import admin
from .models import Monster
from import_export.admin import ImportExportModelAdmin


class MonsterAdmin(ImportExportModelAdmin, admin.ModelAdmin):
    list_display = ('name', 'location')
    # 用于在创建用户时使用
    add_fieldsets = ('name', 'max_health', 'min_attack', 'max_attack', 'defense', 'agility', 'momentum', 'location',
                     'city', 'bio')
    list_display_links = ('name', )
    search_fields = ['name', 'city', 'bio']


admin.site.register(Monster, MonsterAdmin)
